<?php

/*
  Action – Duration	$5

  Now and at the start of your next turn: +$2.

 */

class MerchantShip extends Card implements iAction, iKingdom, iDuration, iSeaside {

    public function __construct() {
        parent::__construct("Merchant Ship", 5);
        $this->duration = 1;
        $this->undoPlay = false;
        $this->undoBuy = true;
    }

    public function getDescription() {
        return array(
            "Now and at the start of your next turn: +$2.");
    }
    
    public function play(Game $game, $isRealCard) {
        $game->addMoney(new Price(2));
         ScreenDisplay::addScreenMessage($game, true, "get  +2$", "gets +2$");

        $game->pushCardToDurationAffects($this, 1, $isRealCard);
		$game->cardActionFinished();
        return true;
    }

    public function cleanup(Game $game) {
        $game->moveCardFromPileToPile($this, PlayArea, DurationPileCards);
    }

    public function startTurn(Game $game, $quantity) {
        $game->addMoney(new Price(2));
         ScreenDisplay::addScreenMessage($game, true, "activate ".  nicePrint($this)." and get  +2$", "activates ". ScreenDisplay::$LMSG." and gets +2$");
        if ($quantity > 0)
            return RETURN_DURATION_TO_DISCARD;
        else
            return DELETE_VIRTUAL_DURATION_CARD;
    }

}

?>